interface Taxable { final double taxRate = 0.06 ; double calculateTax() ; }
Since taxRate
is a constant, it must be set to a value,
here, 6 percent.
Here is a partial definition of Toy
.
Recall that it:
Goods
.minimumAge
.class Toy extends Goods ____________ ____________ { int minimumAge; Toy( String des, double pr, int min) { super( des, pr ); minimumAge = min ; } void display() { super.display() ; System.out.println( "minimum age: " + minimumAge ); } public double ____________() // implementing the interface { return price * ____________ ; } }